package com.itheima.health.controller;

import com.itheima.health.common.MessageConst;
import com.itheima.health.entity.Result;
import com.itheima.health.util.QiniuUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author tian
 * @TIME 2023/1/8 1:36 下午
 * @description 读取yml配置信息Controller
 */
@Slf4j
@RestController
@RequestMapping("/mobile/readConfig")
public class SystemConfigController {
    @Autowired
    private QiniuUtils qiniuUtils;

    @GetMapping("/qiniuImageUrl")
    public Result getQiniuUtils() {
        return new Result(true, MessageConst.ACTION_SUCCESS, qiniuUtils.getUrlPrefix());
    }
}
